package com.smart.oil.mapper;

import com.smart.oil.entity.SmRolePermission;

import java.util.List;

public interface SmRolePermissionMapper {
    int deleteByPrimaryKey(String id);

    int insert(SmRolePermission record);

    int insertSelective(SmRolePermission record);

    SmRolePermission selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(SmRolePermission record);

    int updateByPrimaryKey(SmRolePermission record);

    int batchInsertRolePermission(List<SmRolePermission> list);

    List<String> getRoleIdsByPermissionId(String permissionId);

    //根据permissionId 删除角色和菜单权限关联表相关数据
    int removeByPermissionId(String permissionId);

    //根据角色id获取该角色关联的菜单权限id集合
    List<String> getPermissionIdsByRoleId(String roleId);

    List<String> getPermissionIdsByRoles(List<String> roleIds);


    //根绝角色id删除角色和菜单权限关联表相关数据
    int removeByRoleId(String roleId);
}